#pragma comment(linker, "/STACK:10000000")
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <set>
#include <map>
#include <cstdio>
#include <cassert>
#include <string>
#include <cstring>
#define ldb long double
#define LL long long
#define fi first
#define se second
#define fill(a, c) memset(a, c, sizeof(a))
#define sqr(a) ((a) * (a))
#define nextLine() {int c = 0; while((c = getchar()) != 10 && c != EOF);}
#define getBit(mask, k) (((mask) / pw[k]) % pw[1])
#define setBit(mask, k, l) (((mask) / pw[k + 1] * pw[1] + (l)) * pw[k] + ((mask) % pw[k]))
#define debug(a) cerr << #a << " = " << a << " ";
#define debugl(a) cerr << #a << " = " << a << "\n";
#define mp(a, b) make_pair(a, b)
#define pb(a) push_back(a)
#define ff first
#define ss second 
const ldb LDINF = 9128739847123.00;
const ldb eps = 1e-9;
const int INF = 1 << 30;
const ldb pi = fabsl(atan2(0.0, -1.0));
using namespace std;

string s;

const int mod = 1000003;
int n;

void load()
{
	int c;
	while ((c = getchar()) != 10 && c != EOF)
	{
		if (c == '/') c = '*';
		if (c == '-') c = '+';
		if (c >= '0' && c <= '9')
		{
			wasnum = 1;
			num = num * 10 + c - '0';
		}
		else
		{
			s += c;
			if (wasnum)
				s += '0';
			wasnum = 0;
			num = 0;
		}
	}
	if (wasnum)
		s += '0';
	n = s.size();
}

int dp[2222][2222];

int f(int i, int j)
{
	if (j < 0) 
		return 0;
	if (i == n)
		return 1;
	if (dp[i][j] != -1) return dp[i][j];
	dp[i][j] = 0;
	if (s[i] == '*') return 0;
	if (s[i] == '+')
	{
		if (i + 1 == n || i + 1 < n && s[i + 1] == '*')
		{
			dp[i][j] = 0;
			return 0;
		}
		dp[i][j] += f(i + 1, j + 1);
		dp[i][j] += f()
	}
	
	
}

void solve()
{
	memset(dp, -1, sizeof dp);
	int res = 0;
	for (int i = 0; i <= s.size(); i++)
	{
		res += f(0, i);
		if (res >= mod) res -= mod;
	}
	cout << res;
}

#define file "d"
int main()
{
	freopen(file".in", "rt", stdin);
	freopen(file".out", "wt", stdout);
	load();
	solve();
	return 0;
}
